The present invention relates to computer networks such as LANs (local area networks), and more particularly to a software-based method for reducing network bandwidth consumption and economizing on database space in MAC (media access control) address learning.
In networks, data is typically exchanged between communicating devices in the Form of xe2x80x9cframes.xe2x80x9d Frames include a source MAC address and a destination MAC address; a MAC address uniquely identifies a network device in a xe2x80x9cLayer 2xe2x80x9d communication protocol used in Ethernet and Token Ring LANs.
A network switch connected between communicating devices uses the destination MAC address in an incoming frame generated by a source device to forward the frame to the appropriate target device. The switch typically includes a xe2x80x9ccontrol pointxe2x80x9d (CP) comprising a central processor and control software, and a plurality of forwarding processors. To facilitate forwarding, the CP and forwarding processors perform MAC address xe2x80x9clearning.xe2x80x9d
MAC address learning refers to a process for reducing network traffic, wherein the source MAC address in a received frame is recorded in an address database along with its port of origin. This allows future frames destined for the source address to be forwarded only to the port on which that address is located. Otherwise, an unrecognized address must be xe2x80x9cflooded outxe2x80x9d, i.e., forwarded to every port where the address may reside.
In existing systems, the CP maintains a central database of learned MAC addresses. A number of distributed MAC address databases which are duplicates of the central database are also maintained, locally to groups of ports and forwarding processors. As frames are received, a receiving forwarding processor performs look-ups of the source MAC addresses in the local databases, to determine whether they have been already learned. If not, the forwarding processor notifies the CP, and in response, the CP learns the source address (i.e., records it in the central database along with its port of origin), and adds the address to every local database.
In a variation of the above, the local databases are not duplicated, but the CP is still used to learn source MAC addresses whenever a forwarding processor cannot find the address in a local database.
In another variation, the CP is not used in learning; instead, if a forwarding processor cannot find a source address in a local database, it sends control messages to all other forwarding processors, directing them to add the source address to their respective local databases.
It may be appreciated from the foregoing description that existing methods of MAC address learning entail considerable bandwidth overhead, due to the need for notifying the CP each time an unknown source address is received and for subsequently downloading the address to every local database, or for sending control messages. Also, there is unnecessary duplication of MAC address databases at distributed local sites; most local sites (i.e., physically separate groups of ports and forwarding processors) only use a small proportion of the overall MAC addresses.
In view of the foregoing, a more efficient method of MAC address learning is needed.
According to the present invention, MAC address learning is performed locally rather than by a central processor. In a preferred embodiment, a MAC address database which is local to a destination or target port for a data frame is updated by a local forwarding processor with the source address and port of origin of the data frame. Similarly, the responding data frame is learned locally, in the MAC address database corresponding to the ingress port for the initial data frame. Once the addresses are learned locally, frame forwarding between the corresponding devices can be performed more efficiently.
Local as opposed to centralized learning includes the advantages of eliminating the unnecessary duplication of a central database at local sites. Space is also conserved because each local database contains only those addresses needed and used. Processing cycles are offloaded from the CP, which no longer needs to maintain a central database or download addresses to local databases. Bandwidth that would otherwise have been needed for centralized MAC address learning is available for frame forwarding.
Additionally, MAC address xe2x80x9cagingxe2x80x9d may be performed locally. Aging refers to a process of deleting infrequently-used addresses from a MAC database to save space. Local aging also offloads the CP.
A method of reporting the locally-learned, distributed MAC addresses databases in an aggregate form to network users or a network management application is also disclosed.